<template>
   <div class="school">
        <h2>学校名称{{schoolName}}</h2>
        <h2>学校地址{{schoolAdress}}</h2>
        <button @click="sendSchoolName">把学校名给App</button>
    </div>    
</template>

<script>
     export default({
        name:'School',
        data() {
            return {
                schoolName:'Liuweiwei',
                schoolAdress:'bj'
            }
        },
        props:['getSchoolName'],
        methods: {
            sendSchoolName(){
                this.getSchoolName(this.schoolName)
            }
        },
    })
   
</script>

<style>
    .school{
        background-color: orange;
    }
</style>